package example.other;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

public class ImageSize {
    public static void main(String[] args) {
        try {
            BufferedImage originalImg = ImageIO.read(new File("original.jpg"));
            int width = originalImg.getWidth();
            int height = originalImg.getHeight();
            System.out.println("Width: " + width + "px");
            System.out.println("Height: " + height + "px");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
